<template>
<section @click="clickCurrent('current')" @mousedown="clickCurrent('dragging')">
    <div :class="['custorm--modelbox', 'marketcountdown-show', (custormCurrent == custormIndex)?'drag active':'drag']">
        <div v-if="custormItemData.params.isshow == '2'" class="noshow" v-bind:style="{'background-image':`url(${getPath('noshow.png')})`}"></div>
        <div v-if="custormItemData.style.display == '1'" style="overflow: hidden;">
            <div class="es-countdown-group style1"><img :src="getPath(custormItemData.params.thumb.file_path)" alt="" draggable="false">
                <div class="group "><img :src="getPath('countdown_bg1.png')" alt="" draggable="false">
                    <div class="title">距活动开始还有</div>
                    <div class="time"><span>0</span> <span>1</span> <span class="span">天</span> <span>2</span> <span>2</span>
                        <span class="span">小时</span> <span>1</span> <span>8</span> <span class="span">分</span></div>
                    <div>抢先查看</div>
                </div>
            </div>
        </div>

        <div v-if="custormItemData.style.display == '2'" style="overflow: hidden;">
            <div class="es-countdown-group style2"><img :src="getPath(custormItemData.params.thumb.file_path)" alt="" draggable="false">
                <div class="group ">
                    <img :src="getPath('countdown_bg2.png')" alt="" draggable="false">
                    <div class="title">距活动开始还有</div>
                    <div class="time"><span>0</span> <span>1</span> <span class="span">天</span> <span>2</span> <span>2</span>
                        <span class="span">小时</span> <span>1</span> <span>8</span> <span class="span">分</span></div>
                    <div>抢先查看</div>
                </div>
            </div>
        </div>
        <div class="btn-edit-del" @click="delCurrent"><span class="btn-del iconfont icon icon-close"></span></div>
    </div>
</section>
</template>

<script>
import defaultConfig from './utils/showConfig'
export default {
  mixins: [defaultConfig.mixins],
  props: {
    defaultConfig: {
      type: Object,
      default: function() {
        return defaultConfig
      }
    }
  },
  methods: {

  }
}
</script>

<style lang="scss" scoped>
.custorm--modelbox.marketcountdown-show {
    .es-countdown-group {
        padding: 12px;
    }

    .es-countdown-group>img {
        width: 100%;
        display: block;
        border-radius: 8px 8px 0 0;
    }

    .es-countdown-group .group {
        position: relative;
        height: 66px;
    }

    .es-countdown-group .group img {
        width: 100%;
        display: block;
        position: absolute;
        top: 0;
    }

    .es-countdown-group .group .title {
        position: absolute;
        top: 12px;
        left: 15px;
        line-height: 1;
        color: #fff;
        font-size: 14px;
        font-weight: 700;
    }

    .es-countdown-group .group .time {
        position: absolute;
        top: 36px;
        left: 16px;
        font-size: 13px;
    }

    .es-countdown-group .group .time span.span {
        color: #fff;
    }

    .es-countdown-group .group .time span {
        display: inline-block;
        padding: 0 3px;
        color: #fc5b16;
        font-weight: 700;
    }

    .es-countdown-group .group>div:last-of-type {
        position: absolute;
        top: 18px;
        right: 24px;
        width: 28px;
        font-style: italic;
        font-weight: 700;
        color: #fc5b16;
        font-size: 12px;
        line-height: 15px;
    }

    // 2
    .es-countdown-group.style2 {
        margin-bottom: -22px;
    }

    .es-countdown-group.style2 .group {
        top: -22px;
    }

    .es-countdown-group.style2 .group .title {
        left: 23px;
    }

    .es-countdown-group.style2 .group .time {
        top: 30px;
        left: 25px;
    }

    .es-countdown-group.style2 .group .time span {
        color: #4a78f0;
    }

    .es-countdown-group.style2 .group .time span.span {
        color: #fff;
    }

    .es-countdown-group.style2 .group .time span {
        color: #4a78f0;
    }

    .es-countdown-group.style2 .group>div:last-of-type {
        color: #fff;
        top: 15px;
        right: 22px;
    }
}
</style>
